package com.hedd.shop.mapper;

import com.hedd.shop.pojo.entity.Product;
import com.hedd.shop.pojo.qo.AccurateSearchQO;
import com.hedd.shop.pojo.qo.ProductInsertQO;
import com.hedd.shop.pojo.qo.ProductPagingQO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ludi
 * @date:2020/8/29 14:46
 * @description:商品Mapper
 */
public interface ProductMapper {
    List<Product> selectProductByTypeName(String typeName);

    Product selectProductById(Integer productId);

    List<Product> selectProductOnSearch(String keyWords);

    List<Product> selectProductOnAccurateSearch(AccurateSearchQO accurateSearchQO);
    //分页查询
    List<Product> selectProductUsingPaging(@Param("offset") Integer offset,@Param("pageNum") Integer pageNum,@Param("typeName") String typeName);

    Integer selectProductCountByTypeName(String typeName);

    Integer insertProductCollection(ProductInsertQO productInsertQO);
}
